package month3.day30;

public class Keche extends Car{
    private int zuowei;

    public Keche(String chepai, String pingpai, double money, int zuowei) {
        super(chepai, pingpai, money);
        this.zuowei = zuowei;
    }

    @Override
    public void show() {
        System.out.println("客车  " + getPingpai() + "，车牌：" + getChepai() + "，座位数：" + getZuowei() + "，日租金" + getMoney() + "，" + (getZuangtai()?"当前可租":"已租出"));

    }

    public int getZuowei() {
        return zuowei;
    }

    public void setZuowei(int zuowei) {
        this.zuowei = zuowei;
    }


    @Override
    public double zujin(int day) {
        double m=this.getMoney()*day;
        if(day>150)
            m*=0.6;
        else if(day>30)
            m*=0.7;
        else if(day>7)
            m*=0.8;
        else if(day>30)
            m*=0.9;
        return m;
    }
}
